#include <fs/vfs.h>

int32 fs_node_open(struct fs_node *node) {
    return node->open ? node->open(node) : -1;
}

int32 fs_node_read(struct fs_node *node, void *buf, uint32 count) {
    return node->read ? node->read(node, buf, count) : -1;
}

int32 fs_node_write(struct fs_node *node, void *buf, uint32 count) {
    return node->write ? node->write(node, buf, count) : -1;
}

int32 fs_node_close(struct fs_node *node) {
    return node->close ? node->close(node) : -1;
}

int32 fs_node_link(struct fs_node *node, struct fs_node *to) {
    return node->link ? node->link(node, to) : -1;
}

int32 fs_node_seek(struct fs_node *node, uint32 offset, int32 whence) {
    return node->seek ? node->seek(node, offset, whence) : -1;
}

int32 fs_node_unlink(struct fs_node *node) {
    return node->unlink ? node->unlink(node) : -1;
}


